The example from the Marques-Pita & Rocha (2013) paper.
In [1]:
%load_ext autoreload
%autoreload 2
%matplotlib inline
In [3]:
import networkx as nx
import pandas as pd
#pd.set_option('display.unicode.east_asian_width', False)
#pd.set_option('display.unicode.ambiguous_as_wide', False)
pd.set_option('display.width',200)
import cana
from cana.datasets.bio import MARQUESPITA
from cana.drawing.canalizing_map import draw_canalizing_map_graphviz
import matplotlib.pylab as plt
from IPython.display import Image, display
In [4]:
Image(url="http://journals.plos.org/plosone/article/figure/image?size=large&id=info:doi/10.1371/journal.pone.0055946.g005",width=350)
Out[4]:
In [6]:
net = MARQUESPITA()
print(net)
In [5]:
n = MARQUESPITA().nodes[6]
print( n.outputs)
print( n)
print( 'k_r: %.2f - %.2f' % (n.input_redundancy(mode='node',bound='upper',norm=False), n.input_redundancy(mode='node',bound='lower',norm=False)))
print( 'k_e: %.2f - %.2f' % (n.effective_connectivity(mode='node',bound='upper',norm=False), n.effective_connectivity(mode='node',bound='lower',norm=False)))
print('k_s: %.2f - %.2f' % (n.input_symmetry(mode='node',bound='upper',norm=False), n.input_symmetry(mode='node',bound='lower',norm=False)))
print()
print('k_r: %s (upper)' % n.input_redundancy(mode='input',bound='upper'))
print( 'k_e: %s (upper)' % n.input_redundancy(mode='input',bound='upper'))
print()
dfLUT, dfPI, dfTW = n.look_up_table(), n.schemata_look_up_table(type='pi'), n.schemata_look_up_table(type='ts')
print( display(pd.concat({'Original LUT':dfLUT,'PI Schema':dfPI,'TW Schema':dfTW}, axis=1).fillna('-')))
In [15]:
Image(url="http://journals.plos.org/plosone/article/figure/image?size=large&id=10.1371/journal.pone.0055946.g010",width=350)
Out[15]:
In [8]:
draw_canalizing_map_graphviz(n.canalizing_map())
Out[8]:
In [ ]: